<h1>Listing appointments</h1>

<table>
  <tr>
    <th>Id</th>
    <th>Appointment date</th>
    <th>Showed up</th>
    <th>Patient</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @appointments.each do |appointment| %>
  <tr>
    <td><%= appointment.id %></td>
    <td><%= appointment.appointment_date %></td>
    <td><%= appointment.showed_up %></td>
    <td><%= appointment.Patient %></td>
    <td><%= link_to 'Show', appointment %></td>
    <td><%= link_to 'Edit', edit_appointment_path(appointment) %></td>
    <td><%= link_to 'Destroy', appointment, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Appointment', new_appointment_path %>
